UX Component - Mobile Applications - Location Information

Description

Current location information can be used in several actions in Action Javascript. These actions include Ajax Callbacks, Centering a Map, Placing a Marker on a Map, Filtering a List for Records within the Vicinity of the Current Location.

The Action Javascript builders expose three properties which previously were hard coded to default values. These properties are:

  • High accuracy - If true, the device will use its most accurate method to get location information. If false, the device will use its fastest or lower power consumption method depending on the device. (Default true)

  • Timeout - The amount of time in milliseconds to wait on the device to acquire location information excluding the amount of time it takes the user to grant the web page access to geolocation data. (Default 15000)

  • Max age - The amount of time in milliseconds to accept a previously acquired location. 0 means that a new location must be acquired from the device. (Default 30000).

You can also change the default settings for these properties, by adding Javascript like this (using appropriate values for each of the properties) to the onRenderComplete client-side event:

{dialog.object}.locationMaximumAge = 30000;
{dialog.object}.locationTimeout = 15000;
{dialog.object}.locationHighAccuracy = true;